package com.example.demo.controller;

import com.example.demo.dao.AuthorityDao;
import com.example.demo.model.AuthorityEntity;
import com.example.demo.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AuthorityController {
    @Autowired
    AuthorityDao authorityDao;

    @PostMapping("/api/authority")
    public String insert(AuthorityEntity authority) {
        authorityDao.save(authority);
        return Result.success(authority);
    }



}
